package com.liu.recruit;


import com.liu.common.utils.IdWorker;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
@EnableEurekaClient
public class RecuitApplication {

    public static void main(String[] args) {

        SpringApplication.run(RecuitApplication.class,args);
        
    }

    /**
     * 分布式推特 雪花算法，用于生成id
     * 这里实例化一个id生成器
     * @return
     */
   @Bean
    public IdWorker idWorker(){
        return  new IdWorker(1,2);
   }


}
